package com.hairline.hairlinemarket.service.impl;

import com.hairline.hairlinemarket.bean.MarketGroupon;
import com.hairline.hairlinemarket.bean.MarketGrouponExample;
import com.hairline.hairlinemarket.mapper.MarketGrouponMapper;
import com.hairline.hairlinemarket.service.GrouponService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Author:杨小凯
 * Date:2023-04-21 21:13
 * Description:<描述>
 */
@Service
public class GrouponServiceImpl implements GrouponService {
  @Autowired
  private MarketGrouponMapper grouponMapper;
  @Override
  public List queryById(Integer id) {
    MarketGrouponExample grouponExample = new MarketGrouponExample();
    grouponExample.createCriteria().andUserIdEqualTo(id);
    List<MarketGroupon> marketGroupons = grouponMapper.selectByExample(grouponExample);
    return marketGroupons;
  }
}
